* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  user-select: none
}

html {
  font-size: 16px;
}

canvas,
.gameStart,
.infoTable,
.ranking {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.gameStart {
  animation: changeMax 1s ease-in-out;
  animation-fill-mode: forwards;
  transform: translate(-50%, -50%) scale(0.5);
}

.gameStart,
.infoTable,
.ranking {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f3d55d;
  box-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.4);
  padding: 14px 0;
  z-index: 100;
  transition: 0.3s;
}

@keyframes changeMax {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.gameStart img {
  width: 100px;
}

.gameStart h1 {
  font-size: 25px;
}

.gameStart h2 {
  font-size: 20px;
}

.gameStart p {
  font-size: 16px;
  text-align: center;
}

.title_cont {
  width: 75%;
}

.start,
.submit,
.restart {
  background-color: #9999cc;
  padding: 25px 30px;
  border: none;
  outline: none;
  color: #fff;
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  transition: 0.3s;
  margin-top: 20px;
}

.submit {
  padding: 10px;
}

.start:hover,
.submit:hover,
.restart:hover {
  background-color: #f19e0d;
}

.start::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0;
}

.start:hover::after {
  animation: max 0.6s;
}

@keyframes max {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: .2;
  }

  50% {
    opacity: .3;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.1);
    opacity: 0;
  }
}

.gameInfo {
  width: 700px;
  display: flex;
  justify-content: space-between;
  z-index: 100;
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 2s;
}

.time_cont,
.fuelCounter_cont,
.score_cont,
.suspend {
  display: flex;
  align-items: center;
  color: #fff;
}

.gameInfo img {
  width: 50px;
}

.fuelCounter_cont {
  display: flex;
  align-items: center;
}

.fuelCounter {
  width: 110px;
  height: 30px;
  border: 5px solid #fff;
  position: relative;
}

.fuelCounter span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.fuelCounter::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 2px;
  width: 15px;
  height: 15px;
  background-color: #fff;
}

.progress {
  width: 50%;
  height: 100%;
  color: #fff;
  text-align: center;
  background-color: #9999cc;
  font-size: 1.2rem;
}

.time,
.fuelFont,
.score {
  font-size: 1rem;
}

.suspend div {
  cursor: pointer;
}

.infoTable {
  padding: 30px;
  transform: translate(-50%, -50%) scale(0);
}

.userName {
  border: 1px solid #222;
}

.red {
  border: 1px solid red !important;
}

table th,
table td {
  padding: 10px;
  color: #fff;
  border: solid 1px #fff;
  font-size: 1.5rem;
  text-align: center;
}

table {
  width: 100%;
  height: 19rem;
  border-collapse: collapse;
  margin-bottom: 3rem;
  display: block;
  overflow: auto;
}

table::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 5px;
  /*高宽分别对应横竖滚动条的尺寸*/
  height: 1px;
}

table::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  border-radius: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: #535353;
}

table::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  background: #ededed;
}

.ranking {
  padding: 45px;
  transform: translate(-50%, -50%) scale(0);
}

.ranking h2 {
  font-size: 2rem;
  color: #222;
  margin-bottom: 1rem;
}

.box {
  width: 960px;
  height: 600px;
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  z-index: 99;
  animation: show1 1.6s ease-in-out forwards;
}

@keyframes show1 {

  0%,
  70% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.controller_box {
  width: 100px;
  height: 100px;
  position: absolute;
  left: 10%;
  bottom: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.5s ease-in-out;
}

.controller {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  transform: rotate(45deg);
}

.controller_item {
  width: 50%;
  background-color: #fff;
  opacity: .5;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.controller_item:hover {
  opacity: 1;
}

.controller_item img {
  width: 100%;
}

.controller .controller_item:nth-child(1) img {
  transform: rotate(-45deg);
}

.controller .controller_item:nth-child(2) img {
  transform: rotate(45deg);
}

.controller .controller_item:nth-child(3) img {
  transform: rotate(-12deg);
}

.controller .controller_item:nth-child(4) img {
  transform: rotate(12deg);
}